import React, { Component } from 'react'

 import {HashRouter,Switch,Route} from 'react-router-dom'
import Layout from '../pages/layout/layout'
import Home from '../pages/home/home'
import Shop from '../pages/shop/shop'
import Life from '../pages/life/life'
import Myself from '../pages/myself/myself'
import City from '../pages/city/city'
import Search from '../pages/search/search'
import Detail from '../pages/details/detail'
import Login from '../pages/login/login'
import Shopcar from '../pages/shopcar/shopcar'

export default class Myrouter extends Component{
     render(){
         return(
             <HashRouter>
                 <Switch>
                     <Route path='/shopcar' component={Shopcar}/>
                     <Route path='/login' component={Login}/>
                     <Route path='/detail/:id' component={Detail}/>
                    <Route path='/list/:keyword' component={Search}/>
                    <Route path='/city' exact component={City}/>
                    <Layout path='/'>
                        <Route path='/' exact component={Home}/>
                        <Route path='/shop' component={Shop}/>
                        <Route path='/life' component={Life}/>
                        <Route path='/myself' component={Myself}/>
                    </Layout>
                     
                 </Switch>
             </HashRouter>
         )
     }
 }